import static org.junit.Assert.*;

import org.junit.After;
import org.junit.Before;
import org.junit.Test;


public class LiczbaTest {
	
	Liczba l = null;
	Liczba l2 = null;
	
	@Before
	public void setUp() throws Exception {
		l = new Liczba();
		l2 = new Liczba();
	}
	
	@Test
	public void testA() throws Exception
	{
		l.convert(10, 2);
		assertEquals("1010", l.r);
	}
	
	@Test
	public void testB() throws Exception
	{
		l.convert(10, 3);
		assertEquals("101", l.r);
	}
	@Test
	public void testC() throws Exception
	{
		l.convert(10, 8);
		assertEquals("12", l.r);
	}
	@Test
	public void testCa() throws Exception
	{
		l.convert(15, 16);
		assertEquals("f", l.r); //Zmiana 2
	}
	@Test
	public void testD() throws Exception
	{
		l.convert(10, 17);
		assertEquals("",l.r); //Zmiana 1
	}
	@Test(timeout = 1)
	public void testE() throws Exception
	{
		l.convert(10, 100);
		l2.convert(10, 100);
		assertEquals("",l.r);
		assertEquals(l2.r,l.r);
	}
	@Test
	public void testF() throws Exception
	{
		l.convert(10, 6);
		l2.convert(12, 6);
		assertNotSame(l,l2);
	}
	@After
	public void tearDown() throws Exception {
		l = null;
		l2 = null;
		assertNull(l);
		assertNull(l2);
	}

}
